<template>
  <div>
    <p>您要购买的商品数：{{count}}</p>
    <button @click = "count++">增加一个</button>
    <button @click ="addfn">增加一个</button>
    <button @click ="addfn5(20000)">增加5个</button>
  </div>
</template>

<script>
export default {
     data(){
       return{
         count:0
       }
     },
    methods:{
     addfn(){
       this.count++
     },
     addfn5(num){
       this.count += num
     },
    },
    }
</script>




<style>

</style>